# -*- coding: UTF-8 -*-

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec

import time

def loginte():
    driver=webdriver.Chrome()
    driver.get("file:///D://aut//python100//Day50//selenium.html")
    driver.maximize_window()
    time.sleep(4)
    driver.find_element_by_xpath("//*[@id='signup']/form/input[1]").send_keys("rabbit")
    driver.find_element_by_xpath("//*[@id='signup']/form/input[2]").send_keys("love")
    driver.find_element_by_xpath("//*[@id='signup']/form/input[3]").send_keys(Keys.ENTER)
    time.sleep(5)
    result=driver.find_element_by_xpath("//*[@id='signup']/p").text
    if result=='注册成功':
        print('登录成功')
    else:
        print('登录失败')

loginte()